package me.passtime.projt.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: Lee
 * Date: 11-12-15
 * Time: 下午3:43
 */
public class ResponseCode {
    //成功
    public static final String SUCCESS="00000";
    //包格式错误
    public static final String PACKET_FORMAT_ERROR="00009";
    //未知错误
    public static final String UNKNOWN_ERROR="99999";
    //号码不是联通号码
    public static final String NOT_UNICOM_NUMBER="00100";
    //用户档案不存在
    public static final String USER_NOT_EXIST="00101";
    //密码错误
    public static final String PASSWORD_INCORRECT="00102";
    //注册用户不存在
    public static final String REG_USER_NOT_EXIST="00103";
    //注册用户名已存在
    public static final String REG_NAME_EXIST="00104";
    //用户登录验证失败次数超过规定次数
    public static final String MAX_LOGIN_FAILURE_ERROR="00105";
    //
    public static final String UNKNOWN_ERROR_CODE="00106";
    //用户密码长度不正确
    public static final String PASSWORD_LENGTH_ERROR="00107";
    //密码为初始密码
    public static final String PASSWORD_IS_INIT_PWD="00108";
    //密码重置失败
    public static final String RESET_PASSWORD_FAILURE="00109";
    //短信验证码错
    public static final String SMS_VERIFY_CODE_ERROR="00110";
    //短信验证码已失效
    public static final String SMS_VERIFY_CODE_TIMEOUT="00111";
    //无缴费记录
    public static final String NO_PAYMENT_RECORD="00201";
    //无帐单记录
    public static final String NO_BILL_RECORD="00202";
    //该号码不能充值
    public static final String CAN_NOT_PAYMENT_NUMBER="00301";
    //订单生成错误
    public static final String CREATE_BILL_ERROR="00302";
    //银联扣款不成功
    public static final String UNIONPAY_DEDUCT_FAILURE="00303";
    //银联扣款状态未知
    public static final String UNIONPAY_DEDUCT_UNKNOWN="00304";
    //营帐交费处理不成功
    public static final String HANDLE_PAYMENT_FAILURE="00305";
    //网络连接错误
    public static final String NETWORK_CONNECTION_ERROR="00400";
    //网络连接超时
    public static final String NETWORK_CONNECTION_TIMEOUT="00401";
    //其它系统错误
    public static final String OTHER_SYSTEM_ERROR="00499";
    //无该服务类型
    public static final String SERVICE_NOT_EXIST="00500";
    //不支持该业务
    public static final String NOT_SUPPORT_BUSINESS="00501";
    //此用户类型用户不能使用该业务
    public static final String BUSINESS_CANNOT_USE="00502";
    //其它业务支持错误
    public static final String OTHER_SUPPORT_ERROR="00599";

    public static final Map<String,String> errorCodeMap =new HashMap<String,String>();
    static {
        errorCodeMap.put(SUCCESS, "成功");
        errorCodeMap.put(PACKET_FORMAT_ERROR, "包格式错误");
        errorCodeMap.put(UNKNOWN_ERROR, "未知错误");
        errorCodeMap.put(NOT_UNICOM_NUMBER, "号码不是联通号码");
        errorCodeMap.put(USER_NOT_EXIST, "用户档案不存在");
        errorCodeMap.put(PASSWORD_INCORRECT, "密码错误");
        errorCodeMap.put(REG_USER_NOT_EXIST, "注册用户不存在");
        errorCodeMap.put(REG_NAME_EXIST, "注册用户名已存在");
        errorCodeMap.put(MAX_LOGIN_FAILURE_ERROR, "用户登录验证失败次数超过规定次数");
        errorCodeMap.put(UNKNOWN_ERROR_CODE, "");
        errorCodeMap.put(PASSWORD_LENGTH_ERROR, "用户密码长度不正确");
        errorCodeMap.put(PASSWORD_IS_INIT_PWD, "密码为初始密码");
        errorCodeMap.put(RESET_PASSWORD_FAILURE, "密码重置失败");
        errorCodeMap.put(SMS_VERIFY_CODE_ERROR, "短信验证码错");
        errorCodeMap.put(SMS_VERIFY_CODE_TIMEOUT, "短信验证码已失效");
        errorCodeMap.put(NO_PAYMENT_RECORD, "无缴费记录");
        errorCodeMap.put(NO_BILL_RECORD, "无帐单记录");
        errorCodeMap.put(CAN_NOT_PAYMENT_NUMBER, "该号码不能充值");
        errorCodeMap.put(CREATE_BILL_ERROR, "订单生成错误");
        errorCodeMap.put(UNIONPAY_DEDUCT_FAILURE, "银联扣款不成功");
        errorCodeMap.put(UNIONPAY_DEDUCT_UNKNOWN, "银联扣款状态未知");
        errorCodeMap.put(HANDLE_PAYMENT_FAILURE, "营帐交费处理不成功");
        errorCodeMap.put(NETWORK_CONNECTION_ERROR, "网络连接错误");
        errorCodeMap.put(NETWORK_CONNECTION_TIMEOUT, "网络连接超时");
        errorCodeMap.put(OTHER_SYSTEM_ERROR, "其它系统错误");
        errorCodeMap.put(SERVICE_NOT_EXIST, "无该服务类型");
        errorCodeMap.put(NOT_SUPPORT_BUSINESS, "不支持该业务");
        errorCodeMap.put(BUSINESS_CANNOT_USE, "此用户类型用户不能使用该业务");
        errorCodeMap.put(OTHER_SUPPORT_ERROR, "其它业务支持错误");
    }
}
